Amin Bandali [Sun, 12 Sep 2021 03:03:57 +0000 (23:03 -0400)]
Merge from origin/emacs-27
d7f4cc0974 ERC: Track: Clarify documentation on tracked buffers and a...
fb1f0dfec9 ERC: Track: Fix documentation of structure of 'erc-modifie...
252a769b11 ; * doc/lispref/files.texi (Changing Files): Fix xref to f...
edc93a5ce6 ; Fix grammar in efaq.texi on Emacs vs XEmacs.
# Conflicts:
# doc/misc/efaq.texi
Olivier Certner [Thu, 14 Jan 2021 17:20:26 +0000 (18:20 +0100)]
ERC: Track: Clarify documentation on tracked buffers and add references
* lisp/erc/erc-track.el (erc-modified-channels-alist): Clarify what
the list contains. Add references to variables and functions involved
in displaying tracked buffers from this list.
(erc-make-mode-line-buffer-name): Describe exactly the algorithm, and
reference custom variables that influence it.
Olivier Certner [Wed, 13 Jan 2021 16:39:54 +0000 (17:39 +0100)]
ERC: Track: Fix documentation of structure of 'erc-modified-channels-alist'
* lisp/erc/erc-track.el (erc-modified-channels-alist): Fix the
docstring: each element is a dotted list where the last cdr is
sometimes a proper list, making the element only sometimes a proper
list.
Dmitry Gutov [Sun, 12 Sep 2021 00:28:38 +0000 (03:28 +0300)]
Re-fix bug#16897
* lisp/vc/vc-git.el (vc-git--file-list-is-rootdir):
Extract from 'vc-git-command'.
(vc-git--literal-pathspecs): Use it here as well.
Tassilo Horn [Sat, 11 Sep 2021 20:49:29 +0000 (22:49 +0200)]
Refactor bug-reference setup for software forges
* lisp/progmodes/bug-reference.el (bug-reference-gitea-instances)
(bug-reference-gitlab-instances,bug-reference-sourcehut-instances):
Delete defvars. Those are replaced with bug-reference-forge-alist.
(bug-reference-forge-alist): New variable.
(bug-reference--build-forge-setup-entry): New cl-defgeneric with
methods for github, gitlab, gitea, and sourcehut instances.
(bug-reference--setup-from-vc-alist): Use bug-reference-forge-alist
and bug-reference--build-forge-setup-entry.
* doc/emacs/maintaining.texi (Bug Reference): Mention that the first
group in bug-reference-bug-regexp defines the overlay bounds. Also
mention bug-reference-forge-alist in VCS setup section.
Mattias Engdegård [Sat, 11 Sep 2021 15:13:14 +0000 (17:13 +0200)]
Fix byte-compilation warnings
* lisp/calc/calc-graph.el (calc-gnuplot-check-for-errors):
* lisp/calendar/holidays.el (list-holidays):
Dodge 'save-excursion+set-buffer' warnings that appeared after
the progn flattening was introduced.
Mattias Engdegård [Sat, 11 Sep 2021 12:46:45 +0000 (14:46 +0200)]
Remove obsolete variable
* lisp/emacs-lisp/byte-opt.el
(byte-optimize--vars-outside-condition): Remove.
(byte-optimize-form-code-walker): Remove bindings.
Mattias Engdegård [Fri, 30 Jul 2021 11:44:07 +0000 (13:44 +0200)]
Propagate aliased lexical variables in byte compiler
Replace uses of a variable aliasing another variable with that aliased
variable, to allow for variable removal when possible. This also
enables opportunities for other optimisations. Example:
(let ((y x)) (f y)) => (f x)
The optimisation is only performed if both aliased and aliasing
variables are lexically bound. Shadowing bindings are α-renamed when
necessary for correctness. Example:
(let* ((b a) (a EXPR)) (f a b))
=> (let* ((a{new} EXPR)) (f a{new} a))
* lisp/emacs-lisp/byte-opt.el (byte-optimize--aliased-vars): New.
(byte-optimize-form-code-walker): Cancel aliasing upon mutation.
(byte-optimize--rename-var-body, byte-optimize--rename-var): New.
(byte-optimize-let-form): Add the optimisation.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add relevant test cases.
Eli Zaretskii [Sat, 11 Sep 2021 14:50:42 +0000 (17:50 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 11 Sep 2021 14:50:08 +0000 (17:50 +0300)]
; * src/w32term.c (w32_read_socket): Avoid compiler warning.
Augusto Stoffel [Sat, 11 Sep 2021 13:39:13 +0000 (15:39 +0200)]
Keep python.el compatible with older Emacsen
* progmodes/python.el (python-shell-send-string): Don't assume
comint-max-line-length is defined (bug#50503).
Michael Albinus [Sat, 11 Sep 2021 13:35:51 +0000 (15:35 +0200)]
Tramp code cleanup
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-make-directory): Simplify.
* lisp/net/tramp-sh.el (tramp-methods) <telnet, nc>: Don't use
"%n" marker.
* test/lisp/net/tramp-tests.el (tramp-test13-make-directory): Merge with
`tramp-test-make-directory-helper' and
`tramp-test13-make-directory-with-file-modes'.
(tramp-test44-asynchronous-requests): Use always the same
operation in timer.
Augusto Stoffel [Sat, 11 Sep 2021 13:02:04 +0000 (15:02 +0200)]
Allow using 'python-shell-send-file' across machines
* progmodes/python.el (python-shell-eval-file-setup-code): Look for a
file coding cookie on the Python rather than on the Emacs side, to
avoid additional file transfers.
(python-shell--save-temp-file): Allow argument to be a buffer.
(python-shell-send-file): Address the case where the selected file and
the inferior process are on different machines (bug#50516).
Eli Zaretskii [Sat, 11 Sep 2021 12:59:32 +0000 (15:59 +0300)]
; * src/keyboard.c (make_lispy_position): Fix a recent change.
Augusto Stoffel [Sat, 11 Sep 2021 12:50:28 +0000 (14:50 +0200)]
Implement caching for 'python-shell-completion-at-point'
* lisp/progmodes/python.el (python-shell-completion-at-point): cache
results, since computing them involves talking with the inferior
process and, potentially, network communications
(python-shell--capf-cache): new variable, for cache
(python-shell-completion-get-completions)
(python-shell-completion-native-get-completions): 'import' argument is
not needed anymore.
(python-shell-completion-native-setup)
(python-shell-completion-native-try): pass the setup code
synchronously, to avoid printing a message in the shell (bug#50459).
Alan Third [Wed, 8 Sep 2021 16:57:50 +0000 (17:57 +0100)]
Fix display of tab-bar buttons
* src/xterm.c (x_draw_image_relief):
* src/w32term.c (w32_draw_image_relief): Fix the display of
tab-bar buttons when mouse pointer moves off the button.
(Bug#50424)
Eli Zaretskii [Sat, 11 Sep 2021 11:40:51 +0000 (14:40 +0300)]
Document tool-bar and tab-bar mouse events
* doc/lispref/commands.texi (Click Events): Document the format of
POSITION for tab-bar and tool-bar events.
Eli Zaretskii [Sat, 11 Sep 2021 10:58:10 +0000 (13:58 +0300)]
Fix tab-bar scrolling for mice that report mouse-wheel events
* src/keyboard.c (make_lispy_position): Call
'window_from_coordinates' with last 2 arguments non-zero, to have
it report on tool-bar and tab-bar positions. Tweak the return
value according to the expectations of 'make_lispy_event'.
(make_lispy_event): No more need to inject "tab-bar" into a click
event on the tab bar: it's already there.
Tassilo Horn [Sat, 11 Sep 2021 09:59:06 +0000 (11:59 +0200)]
; Add some TODOs for the bug-reference-<forge>-instances variables
Tassilo Horn [Thu, 9 Sep 2021 20:31:47 +0000 (22:31 +0200)]
bug-reference-bug-regexp now defines a contract for the overlay region
Formerly, bug-reference-fontify placed the overlay on the complete
match of bug-reference-bug-regexp. That made it impossible to encode
constraints like "must not match at BOL" in the regexp without messing
up fontification. Therefore, now it establishes the contract that
subexpression 1 defines the overlay region. Subexpression 2 must
still match the part of the bug reference injected into
bug-reference-url-format if that's a string. If its a function, the
interpretation of subexpressions > 1 is up to the function.
For backwards compatibility, bug-reference-fontify checks if the
bounds of subexpression 2..10 are within the bounds of subexpession
1. If not, or subexpression 1 doesn't even exist/match, we fall back
to placing the overlay from (match-beginning 0) to (match-end 0) but
issue a warning.
* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp): Document
contract that subexpression 1 defines the overlay region and adapt the
default value accordingly.
(bug-reference--nonconforming-regexps): New internal variable.
(bug-reference--overlay-bounds): New function.
(bug-reference-fontify): Place overlay on subexpression 1's bounds if
bug-reference-bug-regexp conforms to the documented contract.
(bug-reference--setup-from-vc-alist): Adapt regexps to new contract.
* doc/emacs/maintaining.texi (Bug Reference): Adapt regexp used in
example.
Eli Zaretskii [Sat, 11 Sep 2021 07:22:06 +0000 (10:22 +0300)]
; * lisp/emacs-lisp/comp.el (native-comp-compiler-options): Doc fix.
Eli Zaretskii [Sat, 11 Sep 2021 07:18:21 +0000 (10:18 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Stefan Kangas [Sat, 11 Sep 2021 07:15:46 +0000 (09:15 +0200)]
* lisp/info.el (Info-streamline-headings): Add entry.
Eli Zaretskii [Sat, 11 Sep 2021 07:16:59 +0000 (10:16 +0300)]
Improve documentation of Show Paren mode
* doc/emacs/programs.texi (Matching): Improve wording and
indexing. (Bug#29381)
Eli Zaretskii [Sat, 11 Sep 2021 06:56:27 +0000 (09:56 +0300)]
Fix restoring from pdumper file on MS-Windows 9X
* src/pdumper.c (dump_map_file_w32): Use PAGE_WRITECOPY flag when
calling CreateFileMapping for DUMP_MEMORY_ACCESS_READWRITE access,
as that is required by Windows 9X. (Bug#50453)
Stephen Gildea [Sat, 11 Sep 2021 03:21:34 +0000 (20:21 -0700)]
; * doc/lispref/files.texi (Changing Files): Fix xref to file-modes.
'file-modes' is in node "Testing Accessibility", not "File Attributes".
Dmitry Gutov [Sat, 11 Sep 2021 02:11:53 +0000 (05:11 +0300)]
New minor mode 'show-paren-local-mode'
* lisp/paren.el (show-paren--delete-overlays):
New function, extracted from show-paren-mode.
(show-paren-local-mode): New minor mode.
(show-paren-mode): Update docstring to mention it (bug#29381).
* doc/emacs/programs.texi (Matching): Update show-paren-mode section.
Tassilo Horn [Fri, 10 Sep 2021 22:04:46 +0000 (00:04 +0200)]
Improve overlay placement performance
* lisp/progmodes/bug-reference.el (bug-reference--overlays-in): New
function.
(bug-reference-unfontify): Use it.
(bug-reference-fontify): Reuse and move existing overlays instead of
deleting all and creating them anew.
Arthur Miller [Fri, 10 Sep 2021 18:57:19 +0000 (20:57 +0200)]
Add support for GCC compiler command-line options
* lisp/emacs-lisp/comp.el ('native-comp-compiler-options): New option.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Add support
for new 'native-comp-compiler-options'.
* src/comp.c (Fcomp_native_compiler_options_effective_p): New function.
(add_compiler_options): New function.
(Fcomp__compile_ctxt_to_file): Call 'add_compiler_options'.
Dmitry Gutov [Fri, 10 Sep 2021 15:42:55 +0000 (18:42 +0300)]
Fix test find-defs-defgeneric-el
* test/lisp/progmodes/elisp-mode-tests.el (find-defs-defgeneric-el):
Fix the test. Reported by dick.r.chiang@gmail.com.
Lars Ingebrigtsen [Fri, 10 Sep 2021 11:06:09 +0000 (13:06 +0200)]
Revert usage of format-prompt in python.el
* lisp/progmodes/python.el (python-eldoc-at-point): Revert usage
of format-prompt in python.el since this is also an ELPA package
(and older Emacs versions doesn't have format-prompt).
Augusto Stoffel [Fri, 10 Sep 2021 11:04:54 +0000 (13:04 +0200)]
Properly encode all strings sent to Python shell
* lisp/progmodes/python.el: Now depends on Emacs 28.
(python-shell-package-enable, python-shell-completion-get-completions)
(python-ffap-module-path, python-eldoc--get-doc-at-point): Enconde
Python strings using 'python-shell--encode-string' instead of triple
quotes.
(python-shell-completion-string-code, python-eldoc-string-code)
(python-ffap-string-code): Remove defcustoms. (bug#50503).
Stephen Gildea [Fri, 10 Sep 2021 13:30:06 +0000 (06:30 -0700)]
Tramp: honor default file modes in make-directory
* lisp/net/tramp-sh.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-sudoedit.el:
* lisp/net/tramp-gvfs.el: Add support for default file modes to
relevant Tramp back ends for make-directory. (Closes: Bug#50410)
* test/lisp/net/tramp-tests.el (tramp-test13-make-directory-with-file-modes):
New test.
* etc/NEWS: Note this enhancement.
Thanks to Michael Albinus for helping improve this patch.
Eli Zaretskii [Fri, 10 Sep 2021 12:02:41 +0000 (15:02 +0300)]
Doc string followup to last change.
* lisp/progmodes/xref.el (xref-find-apropos): Mention
'tags-apropos-additional-actions' in the doc string.
* lisp/progmodes/etags.el (tags-apropos-additional-actions):
Mention 'xref-find-apropos' in the doc string.
Eli Zaretskii [Fri, 10 Sep 2021 11:57:38 +0000 (14:57 +0300)]
Document 'tags-apropos-additional-actions' with Xref
* doc/emacs/maintaining.texi (Looking Up Identifiers): Rearrange
and reword documentation of 'xref-find-apropos' and
'xref-auto-jump-to-first-definition'. Add the description of
'tags-apropos-additional-actions'. Delete the comment with
not-yet implemented features that were available with
'tags-apropos'.
* etc/NEWS: Augment the wording of 'xref-find-apropos' entry.
Lars Ingebrigtsen [Fri, 10 Sep 2021 10:56:22 +0000 (12:56 +0200)]
Further fix for the search-whitespace-regexp change
* lisp/isearch.el (search-whitespace-regexp): Fix yet another typo
in this one-line change (bug#21278).
Gregory Heytings [Fri, 10 Sep 2021 10:43:45 +0000 (12:43 +0200)]
New user options to move between isearch matches
* lisp/isearch.el (isearch-allow-motion,
isearch-motion-changes-direction): New user options.
(isearch-pre-command-hook): Handle the new options.
* etc/NEWS: Mention the new user options.
* doc/emacs/search.texi: Document the new user options.
Lars Ingebrigtsen [Fri, 10 Sep 2021 10:42:22 +0000 (12:42 +0200)]
Fix typo in previous search-whitespace-regexp change
* lisp/isearch.el (search-whitespace-regexp): Fix typo in last
checkin for this variable.
Gregory Heytings [Fri, 10 Sep 2021 10:39:33 +0000 (12:39 +0200)]
Fix behavior of isearch-{beginning,end}-of-buffer
* lisp/isearch.el (isearch-beginning-of-buffer)
(isearch-end-of-buffer): Fix their behavior when
isearch-repeat-on-direction-change is non-nil (bug#50466).
Lars Ingebrigtsen [Fri, 10 Sep 2021 10:27:28 +0000 (12:27 +0200)]
Change the default value of search-whitespace-regexp
* lisp/isearch.el (search-whitespace-regexp): Change the default
to always exclude newlines from the set (bug#21278). It used to
be mode-dependent whether newlines were included or not, and this
was confusing as a user interface.
Dmitry Gutov [Fri, 10 Sep 2021 00:44:49 +0000 (03:44 +0300)]
* lisp/progmodes/ruby-mode.el (ruby-current-indentation): Tweak obsoletion.
Dmitry Gutov [Fri, 10 Sep 2021 00:16:14 +0000 (03:16 +0300)]
Support tags-apropos-additional-actions in etags Xref backend
* lisp/progmodes/etags.el (xref-etags-apropos-location):
New class.
(xref-location-marker): New method definition.
(xref-make-etags-apropos-location): New function.
(etags--xref-apropos-additional): New function.
(xref-backend-apropos): Use it here.
Eli Zaretskii [Thu, 9 Sep 2021 18:04:13 +0000 (21:04 +0300)]
; * lisp/progmodes/python.el (python-shell-send-string): Fix last change.
Eli Zaretskii [Thu, 9 Sep 2021 18:01:53 +0000 (21:01 +0300)]
Improve documentation of tab-bar functions and variables
* etc/NEWS: Improve wording of tab-bar related entries.
* lisp/tab-bar.el (tab-bar-show, tab-bar-select-tab-modifiers):
Improve and clarify the doc strings.
Eli Zaretskii [Thu, 9 Sep 2021 17:08:56 +0000 (20:08 +0300)]
Fix a recent change wrt 'comint-max-line-length'
* lisp/progmodes/python.el (python-shell-send-string): Only heed
'comint-max-line-length' for subprocesses with which we
communicate via PTYs. (Bug#49822)
* lisp/comint.el (comint-max-line-length): Doc fix. Add a value
for MS-Windows.
Stefan Monnier [Thu, 9 Sep 2021 14:24:57 +0000 (16:24 +0200)]
Change ruby-align-chained-calls indendation
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Align with the
first sibling on the previous line instead of the last (bug#32496).
That is, before it used to be
one.two.three
.four
and now it is
one.two.three
.four
Augusto Stoffel [Thu, 9 Sep 2021 13:48:37 +0000 (15:48 +0200)]
Better treatment of line length limits for the Python inferior
* lisp/comint.el (comint-max-line-length): New constant reflecting a
safe maximum line size that can be sent to an inferior process.
* lisp/progmodes/python.el
(python-shell-comint-watch-for-first-prompt-output-filter): Send setup
code to the inferior process only once and at this stage.
(python-shell-eval-setup-code, python-shell-eval-file-setup-code):
Move, unchanged, to an earlier point to avoid byte-compiler warnings.
(python-shell-send-string-no-output): Revert changes of
e32c7d2a8d
(python-shell-send-string): Use 'comint-max-line-length' to decide
when to resort to temp files.
(python-shell-send-string, python-shell-send-file): Don't send setup
code each time (bug#49822).
Lars Ingebrigtsen [Thu, 9 Sep 2021 13:42:00 +0000 (15:42 +0200)]
Clarify Gnus vs. font locking in the Gnus manual
* doc/misc/gnus.texi (Formatting Variables): Explicitly mention
that font locking doesn't work in Gnus buffers (bug#50474).
Lars Ingebrigtsen [Thu, 9 Sep 2021 13:19:56 +0000 (15:19 +0200)]
Remove the "Real meaning of copyleft" node in efaq
* doc/misc/efaq.texi (Real meaning of copyleft): Remove the
section (bug#50446).
(Common acronyms): Add a link to the GNU site's page about licenses.
Juri Linkov [Thu, 9 Sep 2021 07:54:14 +0000 (10:54 +0300)]
; Add NEWS about tab bar mouse commands
Juri Linkov [Thu, 9 Sep 2021 07:52:41 +0000 (10:52 +0300)]
Merge branch 'feature/tab-bar-events'
Juri Linkov [Thu, 9 Sep 2021 07:49:43 +0000 (10:49 +0300)]
; Remove NEWS about tab bar mouse commands to avoid merge conflicts
Michael Albinus [Wed, 8 Sep 2021 14:57:12 +0000 (16:57 +0200)]
Document restriction of completion styles with remote file names
* doc/misc/tramp.texi (File name completion): Mention restriction
of completion styles.
Basil L. Contovounesios [Wed, 8 Sep 2021 10:41:07 +0000 (12:41 +0200)]
; Fix grammar in efaq.texi on Emacs vs XEmacs.
Lars Ingebrigtsen [Wed, 8 Sep 2021 10:21:12 +0000 (12:21 +0200)]
Don't ding at the user in pop-mark
* lisp/simple.el (pop-mark): Don't ding at the user if there's no
mark to pop (bug#44375). This function is used (in some
circumstances) when the user mouse-1-clicks links (in *Help*
buffer, for instance), which will then ding at the user before
following the link.
Lars Ingebrigtsen [Wed, 8 Sep 2021 08:28:15 +0000 (10:28 +0200)]
Further tweak describe-variable look
* lisp/help-fns.el (describe-variable): Tweak how long variable
values are shown.
Eli Zaretskii [Wed, 8 Sep 2021 08:27:09 +0000 (11:27 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Wed, 8 Sep 2021 08:26:17 +0000 (11:26 +0300)]
; * admin/README: Add descriptions of more subdirectories.
Richard Stallman [Wed, 8 Sep 2021 03:25:17 +0000 (23:25 -0400)]
; * admin/README: Mention 'coccinelle'.
Mattias Engdegård [Wed, 8 Sep 2021 08:17:23 +0000 (10:17 +0200)]
* etc/NEWS: macOS alternative context menu mouse binding.
Lars Ingebrigtsen [Wed, 8 Sep 2021 08:13:47 +0000 (10:13 +0200)]
Fix previous help-fns change
* lisp/help-fns.el (help-fns--run-describe-functions): Fix the
test for whether the function inserted anything.
Lars Ingebrigtsen [Wed, 8 Sep 2021 07:45:45 +0000 (09:45 +0200)]
Adjust test to describe-function changes
The doc now always ends with an empty line
Miha Rihtaršič [Wed, 8 Sep 2021 07:40:28 +0000 (09:40 +0200)]
Allow kmacros to end with C-g in minibuffer
* src/keyboard.c (cmd_error): If a command causes a minibuffer-quit
condition, record its key in a keyboard macro (bug#48603).
Lars Ingebrigtsen [Wed, 8 Sep 2021 07:24:11 +0000 (09:24 +0200)]
Add support for keypad `=' key in xterm.el
* lisp/term/xterm.el (xterm-function-map): Add support for keypad
= key (bug#16645).
Lars Ingebrigtsen [Wed, 8 Sep 2021 06:59:29 +0000 (08:59 +0200)]
Don't disable ipython as a native interpreter
* lisp/progmodes/python.el
(python-shell-completion-native-disabled-interpreters): Remove
ipython from list, because it apparently works fine these days
(bug#50458).
Lars Ingebrigtsen [Wed, 8 Sep 2021 06:56:07 +0000 (08:56 +0200)]
Fix mail-user-agent defcustom type
* lisp/simple.el (mail-user-agent): Any symbol can be used as the
value (bug#50460).
Lars Ingebrigtsen [Wed, 8 Sep 2021 06:50:27 +0000 (08:50 +0200)]
Move the indented *Help* block to after the doc string
* lisp/help-fns.el (describe-function-1): Move indented admin
block to the end (bug#50463).
(describe-variable): Ditto (bug#50463).
Lars Ingebrigtsen [Wed, 8 Sep 2021 06:37:11 +0000 (08:37 +0200)]
Don't output "probably introduced" if we know the answer for sure
* lisp/help-fns.el (help-fns--customize-variable-version):
Factored out from `help-fns--customize-variable' to be able to see
whether it outputs anything.
(help-fns--run-describe-functions): New function.
(help-fns--activated-functions): New internal variable.
(describe-variable): Use new function.
(describe-face, describe-function-1): Ditto (bug#50463).
Stefan Kangas [Wed, 8 Sep 2021 01:57:11 +0000 (03:57 +0200)]
Center Emacs logo above text on the splash screen
* lisp/startup.el (fancy-splash-head): Center Emacs logo above
text on the splash and about screen.
Dmitry Gutov [Tue, 7 Sep 2021 23:33:24 +0000 (02:33 +0300)]
Have Git backend actions accept nil filenames again
* lisp/vc/vc-git.el (vc-git--literal-pathspec):
Move the nil check to the beginning (bug#50422).
Harald Jörg [Tue, 7 Sep 2021 20:11:41 +0000 (22:11 +0200)]
cperl-mode.el: Use rx sequences for Perl grammar
Following advice by Mattias Engdegård, most uses of rx-to-string
were eliminated, and rx sequences used instead to define Perl
grammar components.
* lisp/progmodes/cperl-mode.el: (cperl-block-declaration-p): New
function, replaces regexp literals.
(cperl-imenu--function-name-regexp-perl): Deleted, use rx
sequences to find imenu entries instead.
(cperl-indent-line): Use rx components instead of regexp literals.
(cperl-sniff-for-indent): use `cperl-block-declaration-p' to
increase accuracy, use rx sequence for labels to replace
inaccurate regexp literals.
(cperl-block-p): Replace inline comment by docstring. Use
`cperl-block-declaration-p'.
(cperl-after-block-p): Use `cperl-block-declaration-p'.
(cperl-after-block-and-statement-beg): Replace inline comment by
docstring.
(cperl-imenu-package-keywords), (cperl-imenu-sub-keywords),
(cperl-imenu-pod-keywords) : New variables to sort imenu
entries into categories.
(cperl-imenu--create-perl-index): Use rx sequences to collect
imenu entries.
(cperl-init-faces): Use rx components instead of regexp literals
for labels.
* test/lisp/progmodes/cperl-mode-tests.el: Test rx sequences
instead of regexp strings
Eric Abrahamsen [Tue, 7 Sep 2021 18:51:39 +0000 (11:51 -0700)]
Don't let nndiary.el alter variables when loading file
* lisp/gnus/nndiary.el (nndiary-open-server): Move the manipulation of
`gnus-extra-headers' and `nnmail-extra-headers' into this function: it
should only happen if we're actually firing up an nndiary server.
Previously, simply attempting to complete a gnus-* prefixed symbol
could end up loading this file, and changing the variable values.
Glenn Morris [Tue, 7 Sep 2021 16:41:38 +0000 (09:41 -0700)]
; Improve resolution of previous merge conflict
Alan Mackenzie [Tue, 7 Sep 2021 16:31:16 +0000 (16:31 +0000)]
Increase jit-lock-chunk-size from 500 to 1500 for performance reasons
* lisp/jit-lock.el (jit-lock-chunk-size): Increase to 1500.
See also https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg00540.html.
Eli Zaretskii [Tue, 7 Sep 2021 16:22:48 +0000 (19:22 +0300)]
; * doc/emacs/maintaining.texi (Project File Commands): Fix wording.
Lars Ingebrigtsen [Tue, 7 Sep 2021 15:46:52 +0000 (17:46 +0200)]
Encode urls more before using in browse-url
* lisp/net/browse-url.el (browse-url-default-windows-browser)
(browse-url-default-macosx-browser): Encode the URL before using
(in case it contains spaces) (bug#50435).
Lars Ingebrigtsen [Tue, 7 Sep 2021 15:41:31 +0000 (17:41 +0200)]
Fix encoding in browse-url-encode-url
* lisp/net/browse-url.el (browse-url-url-encode-chars): Document
what the argument really is, and simplify the implementation
(bug#50435).
(browse-url-encode-url): Encode spaces.
Alex Bochannek [Tue, 7 Sep 2021 15:12:39 +0000 (17:12 +0200)]
Add a new Gnus command to toggle whether to use fonts in shr
* doc/misc/gnus.texi (Article Washing): Document it.
* lisp/gnus/gnus-art.el (gnus-article-toggle-fonts): New command
and key binding (bug#50383).
Lars Ingebrigtsen [Tue, 7 Sep 2021 14:59:52 +0000 (16:59 +0200)]
Improve the Info mode line further
* lisp/info.el (Info-set-mode-line): Improve the Info mode line
further (bug#13776).
Eli Zaretskii [Tue, 7 Sep 2021 15:45:35 +0000 (18:45 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 7 Sep 2021 15:44:26 +0000 (18:44 +0300)]
Fix a recent documentation change
* lisp/progmodes/xref.el (xref-auto-jump-to-first-definition)
(xref-auto-jump-to-first-xref):
* etc/NEWS: Fix wording and typos.
Glenn Morris [Tue, 7 Sep 2021 15:31:22 +0000 (08:31 -0700)]
Merge from origin/emacs-27
97aa8240d2 (origin/emacs-27) * doc/misc/efaq.texi: Misc copyedits.
e1050492d1 * doc/misc/efaq.texi (Reporting bugs): Refer to the Emacs ...
# Conflicts:
# doc/misc/efaq.texi
Michael Albinus [Tue, 7 Sep 2021 14:28:41 +0000 (16:28 +0200)]
Adapt tramp-test26-file-name-completion
* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion):
Do not check for default method.
Eli Zaretskii [Tue, 7 Sep 2021 13:03:27 +0000 (16:03 +0300)]
Improve documentation of new Xref options
* lisp/progmodes/xref.el (xref-auto-jump-to-first-definition)
(xref-auto-jump-to-first-xref): More accurate description in the
doc strings.
* doc/emacs/maintaining.texi (Looking Up Identifiers)
(Identifier Search, List Identifiers, Project File Commands): Fix
the documentation of 'xref-auto-jump-to-first-definition' and
'xref-auto-jump-to-first-xref' to be more accurate.
* etc/NEWS: More accurate wording of the entry about
'xref-auto-jump-to-first-definition' and
'xref-auto-jump-to-first-xref'.
Michael Albinus [Tue, 7 Sep 2021 12:36:06 +0000 (14:36 +0200)]
Do not expand default method, user, host in remote file name completion
* lisp/net/tramp.el (tramp-completion-handle-file-name-all-completions):
Do not expand default method, user, host. (Bug#50387)
(tramp-get-completion-methods): `partial-method' can be nil.
Eli Zaretskii [Tue, 7 Sep 2021 10:24:01 +0000 (13:24 +0300)]
Fix display of tab-bar buttons
* src/xterm.c (x_draw_image_relief):
* src/w32term.c (w32_draw_image_relief): Fix calculation of relief
thickness for tab-bar buttons.
* lisp/tab-bar.el (tab-bar--load-buttons)
(tab-bar-history-mode): Fix the :margin specification for tab-bar
buttons. (Bug#50424)
A [Tue, 7 Sep 2021 02:12:00 +0000 (19:12 -0700)]
* test/lisp/vc/vc-tests.el (vc-test--version-diff): Git env tweak.
Dmitry Gutov [Tue, 7 Sep 2021 01:44:38 +0000 (04:44 +0300)]
Support specifying just one command in project-switch-commands
* lisp/progmodes/project.el (project-switch-commands):
Describe the new possible type of value.
(project--switch-project-command):
New function, extract from project-switch-project.
(project-switch-project): If project-switch-commands's value is a
symbol, invoke that command without showing a menu.
Co-authored-by: Jiacai Liu <hello@liujiacai.net>
Stefan Kangas [Tue, 7 Sep 2021 01:17:27 +0000 (03:17 +0200)]
Small FAQ fixes
* doc/misc/efaq.texi (Colors on a TTY): Remove reference to
ancient Emacs version 22.
(Finding Emacs on the Internet): Use more current terminology.
Stefan Kangas [Tue, 7 Sep 2021 00:55:16 +0000 (02:55 +0200)]
Remove Emacs FAQ maintainer
* doc/misc/efaq.texi: Remove maintainer Romain Francoise after private
communication.
Stefan Kangas [Tue, 7 Sep 2021 00:00:22 +0000 (02:00 +0200)]
* etc/NEWS: Some further re-organization.
Stefan Kangas [Mon, 6 Sep 2021 23:48:40 +0000 (01:48 +0200)]
* etc/NEWS: Clarify entry about the "*Completions*" buffer.
Tassilo Horn [Mon, 6 Sep 2021 19:47:38 +0000 (21:47 +0200)]
Add possibility to override the default highlighting
* lisp/progmodes/bug-reference.el (bug-reference-fontify): Highlight
99th group if it exists.
(bug-reference-bug-regexp): Document that regexp group 99 can be used
to override the default behavior of highlighting the complete match.
(bug-reference--run-auto-setup): Use run-hook-with-args-until-success
instead of throw/catch.
Mattias Engdegård [Mon, 6 Sep 2021 17:24:53 +0000 (19:24 +0200)]
; * etc/NEWS: revert a change that changed the meaning slightly
Mattias Engdegård [Mon, 6 Sep 2021 12:41:26 +0000 (14:41 +0200)]
Normalise nested `progn` forms in byte-code optimiser
* lisp/emacs-lisp/byte-opt.el (byte-optimize-body): Flatten body.
This simplifies the source tree and reduces the number of different
cases that other optimisations need to take into account.
Mattias Engdegård [Thu, 10 Jun 2021 19:27:16 +0000 (21:27 +0200)]
More robust optimisation of `ignore`
Treat `ignore` as any other function during source-level optimisation,
to avoid having its warning-suppression effects cancelled by repeated
passes. Instead, define a custom code generation function.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Don't treat `ignore' specially here.
(side-effect-free-fns): Don't mark `ignore` as side-effect-free
or error-free (although it is), since that would allow the optimiser
to elide calls.
* lisp/emacs-lisp/bytecomp.el (ignore, byte-compile-ignore):
Define and register a code-gen function.
Mattias Engdegård [Wed, 28 Jul 2021 19:07:58 +0000 (21:07 +0200)]
Optimise `member` and `assoc` (etc) with constant empty list
* lisp/emacs-lisp/byte-opt.el
(byte-optimize-assq): New.
(byte-optimize-member, byte-optimize-assoc, byte-optimize-memq):
When the list argument is constant nil, the result is always nil.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.
Dmitry Gutov [Mon, 6 Sep 2021 14:07:25 +0000 (17:07 +0300)]
Fixup dired-do-find-regexp-and-replace
* lisp/dired-aux.el (dired-do-find-regexp-and-replace):
Disregard the customized value of xref-auto-jump-to-first-xref
(it breaks the xref-query-replace-in-results invocation).
* lisp/progmodes/xref.el (xref-auto-jump-to-first-xref):
Mention the caveat for users or xref distributed through ELPA.
Michael Albinus [Mon, 6 Sep 2021 13:16:51 +0000 (15:16 +0200)]
Revert an accidential change in etc/NEWS
Michael Albinus [Mon, 6 Sep 2021 13:06:07 +0000 (15:06 +0200)]
; Fix typos in etc/NEWS